]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
history: Fix navigation when entering a repeat
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 27 Apr 2011 13:51:53 +0000 (09:51 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 27 Apr 2011 14:08:00 +0000 (10:08 -0400)
If the user typed "a", hit up, and pressed enter again, we wouldn't re-set the
history pointer to the end, so the broken navigation would instead go to the
entry before that.

https://bugzilla.gnome.org/show_bug.cgi?id=648765

js/misc/history.js

index 24d1b514d3a2fb153e2566b1041c61821d5dc844..fa655cfa0709c0065e8912455e33468fdce452f4 100644 (file)
@@ -77,9 +77,9 @@ HistoryManager.prototype = {
             this._history[this._history.length - 1] != input) {
 
             this._history.push(input);
-            this._historyIndex = this._history.length;
             this._save();
-        }   
+        }
+        this._historyIndex = this._history.length;
     },
 
     _onEntryKeyPress: function(entry, event) {